<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Repetier-Firmware: MotorDriverInterface Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="icon128.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Repetier-Firmware
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_motor_driver_interface.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_motor_driver_interface-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">MotorDriverInterface Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_drivers_8h_source.html">Drivers.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for MotorDriverInterface:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_motor_driver_interface.png" usemap="#MotorDriverInterface_map" alt=""/>
  <map id="MotorDriverInterface_map" name="MotorDriverInterface_map">
<area href="class_stepper_driver.html" alt="StepperDriver&lt; stepPin, dirPin, enablePin, invertDir, invertEnable &gt;" shape="rect" coords="0,56,789,80"/>
<area href="class_stepper_driver_with_endstop.html" alt="StepperDriverWithEndstop&lt; stepPin, dirPin, enablePin, invertDir, invertEnable, endstopPin, invertEndstop, minEndstop, endstopPullup &gt;" shape="rect" coords="799,56,1588,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a251d0070d19b61290d73f26d1f6e4501"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_motor_driver_interface.html#a251d0070d19b61290d73f26d1f6e4501">initialize</a> ()=0</td></tr>
<tr class="separator:a251d0070d19b61290d73f26d1f6e4501"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b61d203b4351ea4c132495aeb817086"><td class="memItemLeft" align="right" valign="top">virtual float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_motor_driver_interface.html#a3b61d203b4351ea4c132495aeb817086">getPosition</a> ()=0</td></tr>
<tr class="separator:a3b61d203b4351ea4c132495aeb817086"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa930597d7cc15c14079b27e693727115"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_motor_driver_interface.html#aa930597d7cc15c14079b27e693727115">setCurrentAs</a> (float newPos)=0</td></tr>
<tr class="separator:aa930597d7cc15c14079b27e693727115"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add1af7909fcd39986d3667a533764c5b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_motor_driver_interface.html#add1af7909fcd39986d3667a533764c5b">gotoPosition</a> (float newPos)=0</td></tr>
<tr class="separator:add1af7909fcd39986d3667a533764c5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69e7c7b822bcc7914a155249da4aa59d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_motor_driver_interface.html#a69e7c7b822bcc7914a155249da4aa59d">enable</a> ()=0</td></tr>
<tr class="separator:a69e7c7b822bcc7914a155249da4aa59d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a456be25e18f028ff5dae9264228dc550"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_motor_driver_interface.html#a456be25e18f028ff5dae9264228dc550">disable</a> ()=0</td></tr>
<tr class="separator:a456be25e18f028ff5dae9264228dc550"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53344d16c0bb4c6c90ae7b85369eb861"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_motor_driver_interface.html#a53344d16c0bb4c6c90ae7b85369eb861">home</a> (bool goToCurrent, bool onlyIfNotHomed)=0</td></tr>
<tr class="separator:a53344d16c0bb4c6c90ae7b85369eb861"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>For some special printers you need to control extra motors. Possible reasons are</p><ul>
<li><a class="el" href="class_extruder.html" title="Data to drive one extruder. ">Extruder</a> switches</li>
<li>Clearing surface</li>
<li>Leveling</li>
</ul>
<p>Repetier-Firmware supports up to 4 extra motors that can be controlled by G201 P&lt;motorId&gt; X&lt;pos&gt; - Go to position X with motor motorId G202 P&lt;motorId&gt; X&lt;setpos&gt; - Mark current position as X G203 P&lt;motorId&gt; - Report current motor position G204 P&lt;motorId&gt; S&lt;0/1&gt; - Enable/disable motor G205 P&lt;motorId&gt; S&lt;0/1&gt; E&lt;0/1&gt; - Home motor, S1 = go back to stored position, E1 = home only if endstop was never met, meaning it was never homed with motor.</p>
<p>These motors are already special and there might be different types, so we can not assume one class fits all needs. So to keep it simple, the firmware defines this general interface which a motor must implement. That way we can handle any type without changing the main code. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a456be25e18f028ff5dae9264228dc550"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a456be25e18f028ff5dae9264228dc550">&#9670;&nbsp;</a></span>disable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MotorDriverInterface::disable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="class_stepper_driver_with_endstop.html#a319d76967eaea1a3f2bb7be16017e4fa">StepperDriverWithEndstop&lt; stepPin, dirPin, enablePin, invertDir, invertEnable, endstopPin, invertEndstop, minEndstop, endstopPullup &gt;</a>, and <a class="el" href="class_stepper_driver.html#a896905a12fb4b0eaf3f466333bf1f310">StepperDriver&lt; stepPin, dirPin, enablePin, invertDir, invertEnable &gt;</a>.</p>

</div>
</div>
<a id="a69e7c7b822bcc7914a155249da4aa59d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69e7c7b822bcc7914a155249da4aa59d">&#9670;&nbsp;</a></span>enable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MotorDriverInterface::enable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="class_stepper_driver_with_endstop.html#ab95e43fbf54e5e7823ce2f980826b88d">StepperDriverWithEndstop&lt; stepPin, dirPin, enablePin, invertDir, invertEnable, endstopPin, invertEndstop, minEndstop, endstopPullup &gt;</a>, and <a class="el" href="class_stepper_driver.html#a6b5e1652f108d13a62148de96277c4c1">StepperDriver&lt; stepPin, dirPin, enablePin, invertDir, invertEnable &gt;</a>.</p>

</div>
</div>
<a id="a3b61d203b4351ea4c132495aeb817086"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b61d203b4351ea4c132495aeb817086">&#9670;&nbsp;</a></span>getPosition()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual float MotorDriverInterface::getPosition </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="class_stepper_driver_with_endstop.html#aaf83d4b40a96f982d78403c9a86a7f39">StepperDriverWithEndstop&lt; stepPin, dirPin, enablePin, invertDir, invertEnable, endstopPin, invertEndstop, minEndstop, endstopPullup &gt;</a>, and <a class="el" href="class_stepper_driver.html#ad7a5451d7933609efbb0514614fcd381">StepperDriver&lt; stepPin, dirPin, enablePin, invertDir, invertEnable &gt;</a>.</p>

</div>
</div>
<a id="add1af7909fcd39986d3667a533764c5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add1af7909fcd39986d3667a533764c5b">&#9670;&nbsp;</a></span>gotoPosition()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MotorDriverInterface::gotoPosition </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>newPos</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="class_stepper_driver_with_endstop.html#a3ae76c2865d3f32bc7666c35e82c51cc">StepperDriverWithEndstop&lt; stepPin, dirPin, enablePin, invertDir, invertEnable, endstopPin, invertEndstop, minEndstop, endstopPullup &gt;</a>, and <a class="el" href="class_stepper_driver.html#a18057d0aea5eeb3089f63d935a4033be">StepperDriver&lt; stepPin, dirPin, enablePin, invertDir, invertEnable &gt;</a>.</p>

</div>
</div>
<a id="a53344d16c0bb4c6c90ae7b85369eb861"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53344d16c0bb4c6c90ae7b85369eb861">&#9670;&nbsp;</a></span>home()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MotorDriverInterface::home </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>goToCurrent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>onlyIfNotHomed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="class_stepper_driver_with_endstop.html#a28b565621dda735f3da4332fcb88407a">StepperDriverWithEndstop&lt; stepPin, dirPin, enablePin, invertDir, invertEnable, endstopPin, invertEndstop, minEndstop, endstopPullup &gt;</a>, and <a class="el" href="class_stepper_driver.html#a87bb6f71ca03f748b7c5bf11da569331">StepperDriver&lt; stepPin, dirPin, enablePin, invertDir, invertEnable &gt;</a>.</p>

</div>
</div>
<a id="a251d0070d19b61290d73f26d1f6e4501"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a251d0070d19b61290d73f26d1f6e4501">&#9670;&nbsp;</a></span>initialize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MotorDriverInterface::initialize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="class_stepper_driver_with_endstop.html#acc2ae2d84f933a74fbc2c08e3d15a2fe">StepperDriverWithEndstop&lt; stepPin, dirPin, enablePin, invertDir, invertEnable, endstopPin, invertEndstop, minEndstop, endstopPullup &gt;</a>, and <a class="el" href="class_stepper_driver.html#a543614e9c9b1027364b90e821487fa74">StepperDriver&lt; stepPin, dirPin, enablePin, invertDir, invertEnable &gt;</a>.</p>

</div>
</div>
<a id="aa930597d7cc15c14079b27e693727115"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa930597d7cc15c14079b27e693727115">&#9670;&nbsp;</a></span>setCurrentAs()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MotorDriverInterface::setCurrentAs </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>newPos</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="class_stepper_driver_with_endstop.html#a81023b60c0f5366314e9d728385bb56c">StepperDriverWithEndstop&lt; stepPin, dirPin, enablePin, invertDir, invertEnable, endstopPin, invertEndstop, minEndstop, endstopPullup &gt;</a>, and <a class="el" href="class_stepper_driver.html#a44d4de4f1856f493e9e104072a382c74">StepperDriver&lt; stepPin, dirPin, enablePin, invertDir, invertEnable &gt;</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/ArduinoAVR/Repetier/<a class="el" href="_drivers_8h_source.html">Drivers.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_motor_driver_interface.html">MotorDriverInterface</a></li>
    <li class="footer">Generated on Tue Sep 19 2017 18:54:02 for Repetier-Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
